AS Algorithm 1